<form id="updatePlanForm" class="form-horizontal">
    <br>
    <div class="form-group">
        <input type="hidden" id="inputPid" value="${(result.pid)!}" />
        <input type="hidden" id="inputPeriodTime" value="${(result.periodTime)!}" />
        <label for="inputColor" class="col-sm-2 control-label">颜色*</label>
        <div class="col-sm-6">
            <input type="hidden" id="inputColor" value="${(result.color)!}" class="form-control">
            <a href="javascript:void(0)" id="bcgl_color_img" class="form-control"></a>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">班次名称*</label>
        <div class="col-sm-6">
            <input type="text" name="inputPlanName" id="inputPlanName" value="${(result.planName)!}" class="form-control required">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">定义类型</label>
        <div class="col-sm-6">
            <select value="${(result.defineType)!}" disabled id="inputDefineType" class="form-control">
                <option value="1">系统定义</option>
                <option value="2">自定义</option>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">班次类型</label>
        <div class="col-sm-6">
            <select value="${(result.planType)!}" id="inputPlanType" class=" form-control">
                <option value="1">工作</option>
                <option value="2">非工作</option>
                <option value="3">其他</option>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">开始时间*</label>
        <div class="col-sm-6">
            <div id="planStartTime" class="input-group date form_time" data-date="" data-date-format="hh:ii" data-link-format="hh:ii">
                <input name="inputStartTime" id="inputStartTime" class="form-control" size="16" type="text">
                <span class="input-group-addon"><span class="glyphicon glyphicon-time"></span></span>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">结束时间*</label>
        <div class="col-sm-6">
            <div id="planEndTime" class="input-group date form_time" data-date="" data-date-format="hh:ii" data-link-format="hh:ii">
                <input name="inputEndTime" id="inputEndTime" class="form-control" size="16" type="text">
                <span class="input-group-addon"><span class="glyphicon glyphicon-time"></span></span>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">总时间（小时）</label>
        <div class="col-sm-6">
            <input type="text" id="inputTotalTime" disabled value="${(result.totalTime)!}" class="form-control">
        </div>
    </div>
</form>
<script>
$(document).ready(function() {
    window.planValidator=$('#updatePlanForm').bootstrapValidator({
        message: '无效的输入值',
        feedbackIcons: {
            valid: 'glyphicon glyphicon-ok',
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh'
        },
        fields: {
            inputPlanName: {
                message: '无效的班次名称',
                validators: {
                    notEmpty: {
                        message: '不能为空'
                    },
                    stringLength: {
                        min: 2,
                        max: 10,
                        message: '字符个数为2到10'
                    }
                }
            },
            inputStartTime: {
                validators: {
                    notEmpty: {
                        message: '开始时间不能为空'
                    }
                }
            },
            inputEndTime: {
                validators: {
                    notEmpty: {
                        message: '结束时间不能为空'
                    }
                }
            }
        }
    });
});
</script>
